﻿<Window x:Class="AzureStorageExplorer.DownloadEntitiesDialog"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:controls="clr-namespace:AzureStorageExplorer"
        Title="Download Entities" Height="285" Width="600" ResizeMode="NoResize"
        WindowStartupLocation="CenterOwner">
    <StackPanel Orientation="Vertical">
        <StackPanel Margin="12" Orientation="Vertical">

            <StackPanel Orientation="Horizontal">
                <RadioButton x:Name="DownloadSelectedEntities" GroupName="DownloadScope" IsChecked="True" Margin="0,0,16,0">Download Selected Entities</RadioButton>
                <RadioButton x:Name="DownloadAllEntities" GroupName="DownloadScope">Download All Entities</RadioButton>
            </StackPanel>

            <TextBlock Margin="0,12,0,8" Text="File Format:"></TextBlock>
            <StackPanel Orientation="Vertical">
                <RadioButton x:Name="DownloadFormatCSV" GroupName="DownloadFormat" IsChecked="True" Margin="0,0,16,0">CSV - Comma-Separated Values file (Excel-readable)</RadioButton>
                <RadioButton x:Name="DownloadFormatJSON" GroupName="DownloadFormat">JSON- JavaScript Object Notation file</RadioButton>
                <RadioButton x:Name="DownloadFormatXML" GroupName="DownloadFormat">XML - eXtensible Markup Language file</RadioButton>
            </StackPanel>

            <TextBlock Margin="0,12,0,4" Text="Download to file:"></TextBlock>
            <StackPanel Orientation="Horizontal">
                <StackPanel Width="440" Margin="0,0,12,0">
                    <TextBox x:Name="OutputFile" Margin="0,2,0,0" Background="LightYellow"></TextBox>
                </StackPanel>
                <Button x:Name="CmdSelectOutputFile" Padding="4" Margin="0,0,8,0" Click="CmdSelectOutputFile_Click">Select Output File</Button>
            </StackPanel>

            <CheckBox x:Name="AutoOpen" IsChecked="True" Margin="0,8,0,0">Open file after download completes</CheckBox>
            
            <StackPanel x:Name="ButtonPanel" Orientation="Horizontal"  Margin="0,12,0,0">
                <Button x:Name="CmdDownload" IsDefault="True" Padding="4" Margin="0,0,8,0" Click="CmdDownload_Click">Download</Button>
                <Button x:Name="CmdCancel" IsCancel="true" Padding="4" Click="CmdCancel_Click">Cancel</Button>
            </StackPanel>
            <!--<TextBlock x:Name="Message" Margin="0,12,0,0" />-->
        </StackPanel>
    </StackPanel>
</Window>
